<%--
  Created by IntelliJ IDEA.
  User: jshand
  Date: 2022-10-25
  Time: 11:25
  To change this template use File | Settings | File Templates.
--%>
<%@ page contentType="text/html;charset=UTF-8" language="java" isELIgnored="false" %>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<html>
<head>
    <title>Title</title>
</head>
<body>

<h3>C:out</h3>
<%
    request.setAttribute("name","JSTL学习 ");
    request.setAttribute("html","<h3>标题</h3>");
%>
${name}
out : <c:out value="${name}"></c:out> <br>
out : <c:out value="${name2}" default="东软教育"></c:out> <br>
out : <c:out value="${html}" default="东软教育" escapeXml="true"></c:out> <br>
out : <c:out value="${html}" default="东软教育" escapeXml="false"></c:out> <br>


<h3>C:set</h3>

<c:set
        var="address"
        value="黑龙江"
        scope="request"/>
<c:out value="${address}"></c:out> <br>



<h3>C:remove</h3>
<c:set var="salary" scope="session" value="${2000*2}"/>
<p>salary 变量值: <c:out value="${salary}"/></p>
<c:remove var="salary"/>
<p>删除 salary 变量后的值: <c:out value="${salary}"/></p>

<%--<%--%>
<%--    try{--%>
<%--        int result = 0 / 0 ;--%>
<%--        System.out.println("result = " + result);--%>
<%--    }catch (Exception e){--%>
<%--        e.printStackTrace();--%>
<%--    }--%>

<%--    System.out.println("异常之后的代码");--%>

<%--%>--%>


<c:catch var="ex" >
    <%
        int result = 0 / 0 ;
        System.out.println("result = " + result);
    %>
</c:catch>

ex: <c:out value="${ex}"></c:out>



</body>
</html>
